package net.modul.district.service;

import net.common.service.GeneralService;
import net.modul.district.dao.DistrictDao;
import net.modul.district.dao.impl.DistrictDaoImpl;
import net.modul.district.vo.DistrictVo;

/**
 * 区域编辑业务处理
 * 
 * @author Administrator
 * 
 */
public class DistrictEditorService extends GeneralService {

	private DistrictVo bean;

	@Override
	public void execute() throws Exception {
		DistrictDao dao = new DistrictDaoImpl();
		if(bean.getDistrict_id() != null) {
			dao.update(bean);
		} else {
			dao.insert(bean);
		}
	}

	public void setBean(DistrictVo bean) {
		this.bean = bean;
	}

}
